import Vue from 'vue'
import Router from 'vue-router'
import Login from "@/view/sys/Login";
import Home from "@/view/sys/Home";
import Department from "@/components/Department";
import Project from "@/components/Project";
import Patient from "@/components/Patient";
import Ward from "@/components/Ward";
import Doctor from "@/components/Doctor";
import Medicine from "@/components/Medicine";
import MedicineList from "@/components/MedicineList";
import ProjectList from "@/components/ProjectList";
import PatientList from "@/components/PatientList";
import CostList from "@/components/CostList";
Vue.use(Router)
const originalPush = Router.prototype.push
Router.prototype.push = function push(location) {
    return originalPush.call(this, location).catch(err => err)
}

export default new Router({
    mode:'history',
    routes: [
        {
            path: '/',
            name: '登录',
            component: Login,
            hidden:true
        },]
        /*{
            path: '/home',
            name: '后台管理',
            component: Home,
            hidden: false,
            children:[
                {
                    path:'/introduce',
                    name:'最新数据统计',
                    component:Introduce,
                    hidden: false
                },
                {
                    path:'/doctor',
                    name:'医生管理',
                    component:Doctor,
                    hidden: false
                },
                {
                    path:'/department',
                    name:'科室管理',
                    component:Department,
                    hidden: false
                },
                {
                    path:'/project',
                    name:'项目管理',
                    component:Project,
                    hidden: false
                },
                {
                    path:'/patient',
                    name:'患者管理',
                    component:Patient,
                    hidden: false
                },
                {
                    path:'/ward',
                    name:'病房管理',
                    component:Ward,
                    hidden: false
                },
                {
                    path:'/medicine',
                    name:'药物管理',
                    component:Medicine,
                    hidden: false
                },
                {
                    path:'/medicineList',
                    name:'病人药物管理',
                    component:MedicineList,
                    hidden: false
                },
                {
                    path:'/projectList',
                    name:'病人检查管理',
                    component:ProjectList,
                    hidden: false
                },
                {
                    path:'/patientList',
                    name:'病人历史记录',
                    component:PatientList,
                    hidden: false
                },
                {
                    path:'/costList',
                    name:'病人费用管理',
                    component:CostList,
                    hidden: false
                },
            ]

        },

    ]*/
})
